/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */
#pragma once

#include <xml/Object.h>
#include <string>
#include <lib3d/CameraDesc.h>
#include <lib3d/hard/RenderList.h>
#include <animate/Node.h>
#include <NoCopy.h>
#include <pictureformat/Loader.h>
#include <CompilerFeatures.h>

namespace liba {
namespace lib3d {
namespace hard {
class Hardware;
} // namespace hard

namespace material {

class Texture : public animate::Node
{
public:
	Texture(const Atom & name, bool wrap);
	virtual ~Texture()
	{}
	virtual Texture * Clone()const;

	// Attributes
	const static Atom wrap_name;
	const static Atom factor_name;
	const static Atom image_name;

	virtual void render_to_list( hard::Hardware * hardware, hard::RenderTexture * render_texture )
	{
		render_texture->wrap = wrap;
	}

	static int get_mipmap_levels(pictureformat::Loader * pl);
private:
	properties::DependencyProperty<bool> wrap;
};


} // namespace material
} // namespace lib3d
} // namespace liba
using namespace liba;

